package com.wjp.banquet.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wjp.banquet.common.bean.BaseEmptyEntity;
import com.wjp.banquet.common.enums.DelFlagEnum;
import lombok.Data;

import java.util.Date;

/**
 * @Author 王君平
 * @Date 2024/4/23 17:42
 * @Description
 */
@Data
@TableName("t_banquet")
public class Banquet extends BaseEmptyEntity {

    @TableId(type = IdType.AUTO)
    private Integer id;

    private Integer userId;

    private String name;

    private String reason;

    private String remark;

    private Date crtTime;

    private Boolean delFlag;

    /**
     * @see com.wjp.banquet.common.enums.BanquetIsSealEnum
     */
    private Boolean isSeal;

    @Override
    public void fillUpToSave() {
        this.setCrtTime(new Date());
        this.setDelFlag(DelFlagEnum.USE.isCode());
    }

    @Override
    public void fillUpToUpdate() {

    }
}
